home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio
/
Ham Radio CD-ROM (Emerald Software) (1995).ISO
/
bbs
/
bpq402a
/
bpqhost.doc
< prev
next >
Wrap
Text File
|
1990-12-22
|
4KB
|
152 lines
G8BPQ Host Mode
From Version 4.00, a new application interface to the switch will be provided.
This will replace the existing interfaces (TNC2, PK Host and KISS). New
software should if possible use the new interface - interface routines
supporting the old modes, and WA8DED Host mode, will be provided as TSRs
to support existing application software.
The interface is called using INT 7Fh. The function required is in AH,
and the stream in AL. The system supports 64 streams, or sessions, numbered
from 1 - 64.
;
;
; COMMANDS SUPPORTED ARE
;
; AH = 1 Set application mask to value in DL.
; Set application flags to value in CL.
; If top bit of CL is set, monitored frames will be available.
; Use function 11 to receive them.
;
; AH = 2 Send frame in ES:SI (length CX)
;
;
; AH = 3 Receive frame into buffer at ES:DI, length of frame returned
; in CX. BX returns the number of outstanding frames still to
; be received (ie. after this one) or zero if no more frames
; (ie. this is last one).
;
;
;
; AH = 4 Get stream status. Returns:
;
; CX = 0 if stream disconnected or CX = 1 if stream connected
; DX = 0 if no change of state, or DX = 1 if
; the connected/disconnected state has changed.
;
; AH = 5 ACK stream status change.
;
;
; AH = 6 Session control.
;
; CX = 1 connect to node
; CX = 2 disconnect
; CX = 3 return user to node
;
;
; AH = 7 Get buffer counts for stream. Returns:
;
; BX = number of frames queued for receive
; CX = number of un-acked frames to be sent
; DX = number of buffers left in node
;
;
; AH = 8 Port control/information. Called with a stream number
; in AL returns:
;
; ES:DI = CALLSIGN (10 bytes space padded)
;
; The following are not supported by the current version,
; but I expect to add them soon.
;
; AX = Radio port on which channel is connected (if level 2)
; BX = L2 paclen for the session
; CX = L2 maxframe for the radio port (if level 2 session)
; DX = L4 window size (if L4 circuit, or zero)
;
;
; AH = 10 RAW (KISS) transmit frame. Data pointed to by ES:SI, of
; length CX, is transmitted as a HDLC frame on the radio
; port (not stream) in AL.
;
;
; AH = 11 Get Trace (RAW Data) Frame into ES:DI, Length to CX
;
;
; The following additions have been proposed. Similar functions may
; be provided, but not necessarily in this format.
;
;
; AH = 0 Get node/switch version number and description. On return
; AH = major version number and AL = minor version number,
; and user's buffer pointed to by ES:SI is set to the text
; string normally output by the USERS command. CX is set to the
; length of the text string.
;
;
; AH = 9 Fetch node/application callsign & alias or application names
;
; AL = application
; BL = 0 to get Callsign, 1 to get Application Name
;
; number:
;
; 0 = node
; 1 = BBS
; 2 = HOST
; 3 = SYSOP etc. etc.
;
; Returns string with alias & callsign or application name in
; user's buffer pointed to by ES:SI length CX. For example:
;
; "WORCS:G8TIC" or "TICPMS:G8TIC-10".
;
;
The application code should check for the presence of the interface as
follows:
;
; THE 7 BYTES PRECEEDING THE INT 7F ENTRY CONTAIN THE STRING
; 'G8BPQ', FOLLOWED BY THE MAJOR AND MINOR VERSION NUMBERS
;
G8BPQ DB 'G8BPQ'
INIT:
;
; CHECK SWITCH IS PRESENT, AND GET NODE VERSION
;
PUSH DS
XOR AX,AX
MOV DS,AX
LDS SI,DS:[1FCH] ; GET POINTER TO INT 7F CODE
SUB SI,7
MOV DI,OFFSET G8BPQ
MOV CX,5
REP CMPSB ; MAKE SURE SWITCH IS LOADED
JE SWITCHOK
POP DS
..
..
.. SWITCH NOT PRESENT CODE
..
..
SWITCHOK:
MOV AL,DS:[SI]
MOV MAJORVERSION,AL
MOV AL,DS:1[SI]
MOV MINORVERSION,AL
POP DS
..
..